<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Pragma" content="no-cache" />
		<title>我的易安</title>
		<%@ include file="/user_comm.jsp"%>

		<link href="<%=request.getContextPath()%>/css/prop.css"
			type="text/css" rel="stylesheet" />

		<!-- script start -->
		<script src="<%=request.getContextPath()%>/js/user.js"
			language="JavaScript"></script>
		<!-- script end -->
	</head>
	<body>
		<%@ include file="/user_top.jsp"%>
		<div class="realCer">
			<!--导航-->
			<!--主体部分start-->
			<div class="realMain clearfix mt10">
				<%@ include file="/user_menu.jsp"%>
				<div class="realRight ml10 Buyer">
					<div class="mybox">
						<div class="mytit">
							<s:if test="#request.userInfo.id == null ">
							新增用户信息
						</s:if>
							<s:elseif test="#request.selfFlag == true">
							个人信息维护
						</s:elseif>
							<s:else>
							编辑用户信息
						</s:else>
						</div>
						<div class="con Orbuy">
							<s:form name="formpage" id="formpage" action="userInfo_save"
								namespace="/">
								<s:token>
								</s:token>
								<s:hidden id="hdfId" name="userInfo.id"
									value="%{#request.userInfo.id}" />
								<s:hidden id="hdfUserId" value="%{#request.userInfo.userId}" />
								<s:hidden id="hdfEmail" value="%{#request.userInfo.email}" />
								<s:hidden id="hdfCompanyId" name="userInfo.companyId"
									value="%{#request.userInfo.companyId}" />
								<s:hidden name="userInfo.country"
									value="%{#request.userInfo.country}" />
								<s:hidden id="hdfFlag" name="flag" value="%{#request.selfFlag}" />
								<%@ include file="/messages.jsp"%>
								<table class="basicInfor">
									<tr>
										<th>
											账户代码：
										</th>
										<td class="fc9">
											<s:if test="userInfo.id == null ">
												<strong>${companyId }-</strong><span class="at_text t_1_d"><input id="userId"
														name="userInfo.userId" type="text" style="width: 130px;"
														value="${userInfo.userId }" maxlength="16" size="15" /> </span>
											</s:if>
											<s:else>
												<strong>${userInfo.userId }</strong>
											</s:else>
										</td>
									</tr>
									<tr id="tr_zhname">
										<th>
											姓&nbsp;&nbsp;名：
										</th>
										<td class="fc9">
											<span class="at_text t_1_d"> <input
													name="userInfo.chineseName" type="text"
													value="${userInfo.chineseName }" maxlength="30" size="20" />
											</span>
										</td>
									</tr>
									<!-- 
									<tr>
										<th>
											英文名：
										</th>
										<td class="fc9">
											<span class="at_text t_1_d"> <input
													name="userInfo.firstName" type="text" maxlength="20"
													style="width: 120px;" size="10"
													value="${userInfo.firstName }" title="first name" /> </span>
											&nbsp;
											<span class="at_text t_1_d"> <input
													name="userInfo.lastName" type="text" maxlength="20"
													style="width: 100px;" size="10"
													value="${userInfo.lastName }" title="last name" /> </span>
										</td>
									</tr>
 									-->
									<tr>
										<th>
											性&nbsp;&nbsp;别：
										</th>
										<td>
											<s:radio name="userInfo.sex"
												list="#{'1':'男','0':'女','2':'保密'}"
												value="%{#request.userInfo.sex}"></s:radio>
										</td>
									</tr>


									<!-- 不能修改自己的部门,级别,状态 -->
									<s:if test="#request.selfFlag == false">
										<tr>
											<th>
												所属部门：
											</th>
											<td>
												<s:select id="deptId" name="userInfo.deptId"
													list="#request.deptList" headerKey="-1" headerValue="请选择"
													value="#request.userInfo.deptId">
												</s:select>
												<span id="deptIdError"></span>
											</td>
										</tr>
										<tr>
											<th>
												账户级别：
											</th>
											<td>
												<s:select id="roleId" name="userInfo.userRole"
													list="#request.roleList" headerKey="-1" headerValue="请选择"></s:select>
												<span id="roleIdError"></span>
											</td>
										</tr>
										<s:if test="#request.userInfo.id != null ">
											<tr>
												<th>
													状&nbsp;&nbsp;态：
												</th>
												<td>
													<s:radio name="userInfo.status" list='#{"1":"正常","2":"冻结"}'
														value="#request.userInfo.status"></s:radio>
												</td>
											</tr>
										</s:if>
									</s:if>

									<tr id="tr_mobile">
										<th>
											手&nbsp;&nbsp;机：
										</th>
										<td class="fc9">
											<span class="at_text t_1_d"><input id="cellphone"
													name="userInfo.cellphone" type="text" maxlength="15"
													size="30" value="${userInfo.cellphone }" /> </span>
										</td>
									</tr>

									<tr>
										<th>
											联系电话：
										</th>
										<td class="fixedTel">
											<!-- 
											<span class="at_text t_1_d"> <input
													name="userInfo.countryCode" type="text" maxlength="5"
													class="area" size="5" value="${userInfo.countryCode }" />
											</span> -<span class="at_text t_1_d"> <input
													name="userInfo.regionCode" type="text" class="area"
													maxlength="5" size="5" value="${userInfo.regionCode }" />
											</span>
											 -->
											<span class="at_text t_1_d"> <input
												name="userInfo.telephone" type="text" maxlength="18"
												size="30" value="${userInfo.telephone }" /> </span>
										</td>
									</tr>

									<tr>
										<th>
											电子邮箱：
										</th>
										<td class="fc9">
											<span class="at_text t_1_d"><input id="email"
													name="userInfo.email" type="text"
													value="${userInfo.email }" maxlength="50" size="30"
													style="width: 280px;" />
											</span>
										</td>
									</tr>
									<!-- 
									<s:if
										test="#request.userInfo.id == null || #request.selfFlag == true">
										<tr>
											<th>
												邮件通知：
											</th>
											<td class="fc9">
												<s:select list="#{'NO NEED':'不接收','en':'英文','zh_CN':'中文'}"
													name="userInfo.lang" value="#request.userInfo.lang"
													id="lang" cssStyle="width:80px">
												</s:select>
												<span class="orange1 ml5">接收邮件可实时了解业务单动态</span>
											</td>
										</tr>
									</s:if>
 									-->
 									
									<s:if test="#request.userInfo.id == null ">
										<tr>
											<th>
												登录密码：
											</th>
											<td class="fc9">
												<span class="at_text t_1_d"><input
														name="userInfo.password" id="password1" type="password"
														size="20" maxlength="20" class="required" value=""
														title="*必填" /> </span>
											</td>
										</tr>

										<tr>
											<th>
												再次输入密码：
											</th>
											<td class="fc9">
												<span class="at_text t_1_d"><input name="password2"
														id="password2" type="password" size="20" maxlength="20"
														class="required" value="" title="*必填" /> </span>
											</td>
										</tr>
									</s:if>

									<tr>
										<th></th>
										<td>
											<a href="javascript:void(0);" class="at_but b_1_y"
												id="reg_sub"><u></u>确认</a>
											<a href="javascript:javascript:history.go(-1);"
														class="at_but b_1_y" id="reg_sub"><u></u>取消</a>
										</td>
									</tr>
								</table>
							</s:form>
						</div>
					</div>
					<!--主体部分end-->
				</div>
			</div>
		</div>
		<!--底部 start-->
		<%@ include file="/user_button.jsp"%>
		<!--底部end-->
		<!-- //0-新增，1-修改，2-个人信息维护 -->
		<s:if test="#request.userInfo.id == null ">
			<!-- 新增用户信息  -->
			<script type="text/javascript">
					new user(0);
				</script>
		</s:if>
		<s:elseif test="#request.selfFlag == true">
			<!-- 个人信息维护  -->
			<script type="text/javascript">
					new user(2);
				</script>
		</s:elseif>
		<s:else>
			<!-- 编辑用户信息  -->
			<script type="text/javascript">
					new user(1);
				</script>
		</s:else>
	</body>
</html>
